Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building and deploying documentaton #546

Merged
merged 2 commits into from
Jan 6, 2023
Merged

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jan 6, 2023

The current build:doc script does not work, as typedoc has changed its interface, this is fixed by the first commit.
Also the documentation is not deployed anymore since travis was removed, this is fixed by the second commit which uses a github action for documentation deployment.

@susnux susnux added bug Something isn't working documentation Improvements or additions to documentation labels Jan 6, 2023
@susnux susnux force-pushed the fix/documentaton branch 2 times, most recently from b5451d4 to 11650a8 Compare January 6, 2023 13:39
Copy link
Contributor

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved and fixed the deploy workflow:

  • spacing
  • setup node
  • deploy on doc branch and not master

Comment on lines 1 to 24
name: Deploy documentation
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install and Build 🔧
run: |
npm ci
npm run build:doc

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist/doc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: Deploy documentation
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install and Build 🔧
run: |
npm ci
npm run build:doc
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist/doc
name: Deploy documentation
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v2
id: versions
with:
fallbackNode: '^14'
fallbackNpm: '^7'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: Install dependencies & build
run: |
npm ci
npm run build:doc --if-present
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist/doc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

branch: gh-pages is not needed as that is the default, but I think adding it does not hurt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good to know! :)

@skjnldsv
Copy link
Contributor

skjnldsv commented Jan 6, 2023

Also, please rename the workflow to a more straightforward name like documentation-deploy.yml or documentation.yml 😉

* Add `typedoc.json` instead of command-line flags, as the interface changed
* Add plugin to document not exported objects (needed for the gettext module)
* Add some module description for index and gettext

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
@skjnldsv skjnldsv merged commit 059b02e into master Jan 6, 2023
@skjnldsv skjnldsv deleted the fix/documentaton branch January 6, 2023 14:03
@skjnldsv
Copy link
Contributor

skjnldsv commented Jan 6, 2023

@skjnldsv
Copy link
Contributor

skjnldsv commented Jan 6, 2023

@skjnldsv
Copy link
Contributor

skjnldsv commented Jan 6, 2023

Worked! https://nextcloud.github.io/nextcloud-l10n/

This was referenced Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants